package com.proton.carepatchtemp.utils;

import android.content.Context;
import android.support.annotation.StringRes;

import com.proton.carepatchtemp.application.VCare;
import com.sdsmdg.tastytoast.TastyToast;

/**
 * Created by MoonlightSW on 2016/11/15.
 */

public class TastyUtils {
    public static void makeText(String msg, int length, int type) {
        TastyToast.makeText(VCare.get(), msg, length, type);
    }

    public static void makeText(Context context, String msg, int length, int type) {
        TastyToast.makeText(context, msg, length, type);
    }

    public static void makeTextShort(String msg, int type) {
        TastyToast.makeText(VCare.get(), msg, TastyToast.LENGTH_SHORT, type);
    }

    public static void makeText(@StringRes int msg, int length, int type) {
        TastyToast.makeText(VCare.get(), VCare.get().getResources().getString(msg), length, type);
    }

    public static void makeText(Context context, @StringRes int msg, int length, int type) {
        TastyToast.makeText(context, VCare.get().getResources().getString(msg), length, type);
    }

    public static void makeTextShort(@StringRes int msg, int type) {
        TastyToast.makeText(VCare.get(), VCare.get().getResources().getString(msg), TastyToast.LENGTH_SHORT, type);
    }

}
